package com.yiya.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.yiya.bean.ForgetPwd;
import com.yiya.model.ForgetPwdExample;

public interface ForgetPwdMapper {
    int countByExample(ForgetPwdExample example);

    int deleteByExample(ForgetPwdExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ForgetPwd record);

    int insertSelective(ForgetPwd record);

    List<ForgetPwd> selectByExample(ForgetPwdExample example);

    ForgetPwd selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ForgetPwd record, @Param("example") ForgetPwdExample example);

    int updateByExample(@Param("record") ForgetPwd record, @Param("example") ForgetPwdExample example);

    int updateByPrimaryKeySelective(ForgetPwd record);

    int updateByPrimaryKey(ForgetPwd record);
    
    /**
     * 根据用户获取可用的记录
     * @param param
     * @return
     */
    ForgetPwd selectByUser(Map<String, Object> param);
    
    /**
     * 获取失效但状态还未更改的记录
     * @param param
     * @return
     */
    List<ForgetPwd> selectExpireRecord(Map<String, Object> param);
    
    /**
     * 根据UUID获取有效的记录
     * @param param
     * @return
     */
    ForgetPwd selectByUUID(Map<String, Object> param);
}